<?php
/*
 * wishingWall 0.0.3 - postpad.php
 *
 * Copyright (c) 2008 DeltaCat (http://www.zu14.cn)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $Date: 2008-12-6 14:22:17 -0400 (Sat, 6 Dec 2008) $
 */
 ?>
<?php
    header('Content-Type: text/html; charset=utf-8');
    require_once('_incs/_pad.php');

    if(isset($_POST['wish']) && !empty($_POST['wish']))
    {
        $wish = rtrim($_POST['wish']);
        $wTo = trim($_POST['wTo']);
        $wTo = empty($wTo) ? '所有人' : $wTo;

        $wFrom = trim($_POST['wFrom']);
        $wFrom = empty($wFrom) ? '匿名' : $wFrom;

        $pad = new Pad;
        $pad->post($wTo, $wFrom, $wish);
        $pad = null;
    }

    die();
?>